package cn.yangliu.jpa.function;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

/**
 * @author 杨柳
 * @date 2019-06-15
 */
@FunctionalInterface
public interface PredicateBuilder {

    /**
     * @param root     Root
     * @param cb       CriteriaBuilder
     * @param fildName 属性名
     * @param value    属性值
     * @return Predicate
     */
    Predicate build(Root<?> root, CriteriaBuilder cb, String fildName, Object value);
}
